package cn.fl.product.service.impl;

import java.util.List;

import org.springframework.stereotype.Service;

import cmm.mid.core.framework.page.Pager;
import cn.cmm.base.framework.exception.BaseException;
import cn.cmm.base.framework.utils.CollectionUtils;
import cn.cmm.base.framework.utils.StringUtils;
import cn.fl.product.service.ISplOrgRService;
import cn.fl.product.transform.SplOrgRVOTransform;
import cn.fl.product.vo.SplOrgRVO;
import fl.spl.facade.spl.dto.SplOrgRDTO;

/**
 * @Description: 供应商-事业部（组织架构）关系表 客户端服务层接口实现
 * @Description: 持久层方法名称前缀：新增：insert* 删除：delete* 修改：update* 批量：batch* 查询对象：select* get* find* 查询集合：select*
 */
@Service
public class SplOrgRServiceImpl implements ISplOrgRService {

	/**
	 * TODO 自定义 API 暴露服务
	 */
	//@Autowired
	//private I自定义ApiService 自定义ApiService;

	@Override
	public SplOrgRVO selectById(Long id) throws BaseException{
		if(StringUtils.isEmpty(id)){
			return null;
		}
		//TODO 业务逻辑
		SplOrgRDTO dto = null;//this.自定义ApiService.selectById(id);
		return SplOrgRVOTransform.toVO(dto);
	}

	@Override
	public Long add(SplOrgRVO entity) throws BaseException{
		if(null == entity){
			return null;
		}
		//return this.prdSplOrgRApiService.add(PrdSplOrgRVOTransform.toDTO(entity));
		//TODO 业务逻辑
		return null;
	}

	@Override
	public boolean removeById(Long id) throws BaseException{
		if(StringUtils.isEmpty(id)){
			return false;
		}
		//return this.prdSplOrgRApiService.removeById(id);
		//TODO 业务逻辑
		return false;
	}
	
	/**
     * 删除
     * @param ids
     * @return
     */
	@Override
    public boolean removeByIds(List<Long> ids)throws BaseException{
    	if(CollectionUtils.isEmpty(ids)){
			return false;
		};
		return false;
    }

	@Override
	public boolean modify(SplOrgRVO entity) throws BaseException{
		if(null == entity){
			return false;
		}
		//return this.prdSplOrgRApiService.modify(PrdSplOrgRVOTransform.toDTO(entity));
		//TODO 业务逻辑
		return false;
	}

	@Override
	public Pager searchListPage(Pager page) throws BaseException{
		if(null == page){
			page = new Pager();
		}
		//return this.prdSplOrgRApiService.searchListPage(page);
		//TODO 业务逻辑
		return null;
	}
}
